﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;

namespace Microsoft.Bing
{
    /// <summary>
    /// Implements a simple serializable object for capturing a search query
    /// </summary>
    public class SearchHistoryItem
    {
        /// <summary>
        /// Instantiates a <see cref="SearchHistoryItem"/> instance
        /// </summary>
        public SearchHistoryItem()
        {
            this.Query = String.Empty;
            this.LastUsed = DateTime.Now;
        }

        /// <summary>
        /// Instantiates a <see cref="SearchHistoryItem"/> instance.
        /// </summary>
        /// <param name="query">The query string entered for the search</param>
        public SearchHistoryItem(string query)
        {
            this.Query = query;
            this.LastUsed = DateTime.Now;
        }

        /// <summary>
        /// Gets/Sets the Query string for the <see cref="SearchHistoryItem"/>.
        /// </summary>
        public string   Query { get; set; }

        /// <summary>
        /// Gets/Sets a <see cref="System.DateTime"/> for the <see cref="SearchHistoryItem"/>.
        /// </summary>
        public DateTime LastUsed { get; set; }
    }

    /// <summary>
    /// Implements an observable stack of <see cref="SearchHistoryItem"/> instances.
    /// </summary>
    public class SearchHistory : ObservableCollection<SearchHistoryItem>
    {
    }
}
